package com.wejoy.video.middle.station.data.vo;

/**
 * 返回错误码，对外接口一定要设置错误码 错误码按照顺序递增，不要重复
 */
public enum ReturnCode {

    CODE_OK(200, "成功"),

    OPEN_API_CODE_OK(0, "成功"),

    SYS_ERROR(1, "系统繁忙，请联系管理员。"),

    LOGIN_TIMEOUT_ERROR(2, "登录已超时，请重新登录。"),

    PERMISSION_DENY(3, "当前用户，没有权限。"),

    PARAM_ERROR(4, "参数错误"),

    CUSTOM_EXCEPTION(5, "自定义异常"),

    SYS_PARAM_IS_NULL_ERROR(6, "入参%s不能为空"),

    PARSE_ERROR(7, "数据解析错误"),

    CUSTOM_MESSAGE(8, "%s"),

    NOT_LOGIN_ERROR(9, "用户未登录"),

    TOKEN_EXPIRATION_ERROR(9, "token过期"),

    INVALID_USER_ERROR(9, "无效用户"),

    VERSION_NEED_UPGRADE(10, "APP版本需要升级"),

    LOGON_USER(11, "该账户已注销"),

    /**
     * The success.
     */
    SUCCESS(0, "成功"),

    /**
     * The fail.
     */
    FAIL(-1, "系统繁忙,请稍后再试"),
    ;

    private Integer code;
    private String msg;

    ReturnCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    @Override
    public String toString() {
        return "code:" + code + ", msg:" + msg;
    }
}
